All Functions of Week 1

head

{utils}

Show first 5 rows of a data frame

sd

{stats}

Get standard deviation of a vector

names

{base}

Retrieve names of a list/vector

cbind

{base}

Combine R objects by columns

str

{utils}

Get the structure of an R object

mean

{base}

Get mean of a vector

library

{base}

Load an R package

rbind

{base}

Combine R objects by rows

ls

{base}

Return a vector of character strings giving the names of the objects in the specified environment

plot

{graphics}

Generic function from base R to produce a plot

ls.str

{utils}

Similarly to ls, with a print() method that calls str() on each object

ncol

{base}

Get number of columns of a data frame

table

{base}

Obtain frequency table of a variable/cross-tabulation of two variables

attach

{base}

Attach Set of R Objects to Search Path

View

{base}

View a data frame

setwd

{base}

Set Working Directory

c

{base}

Combine values/vectors into a vector

class

{base}

Retrieve class of an R object

ifelse

{base}

Return a or b depending on the value of test

read.spss

{foreign}

Read a .sav file (SPSS data)

nrow

{base}

Get number of rows of a data frame

dim

{base}

Get dimensions of a data frame

The end!